//package com.cs.common.config;
//
//import org.elasticsearch.client.RestHighLevelClient;
//import org.springframework.beans.factory.annotation.Value;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.data.elasticsearch.client.ClientConfiguration;
//import org.springframework.data.elasticsearch.client.RestClients;
//import org.springframework.data.elasticsearch.config.AbstractElasticsearchConfiguration;
//
//@Configuration
//public class EsConfig extends AbstractElasticsearchConfiguration {
//
//    @Value("${spring.elasticsearch.rest.uris}")
//    private String host;
//
//    @Bean
//    @Override
//    public RestHighLevelClient elasticsearchClient() {
//        ClientConfiguration build =
//                ClientConfiguration.builder()
//                        .connectedTo(host)
//                        .build();
//        return RestClients.create(build).rest();
//
//    }
//}
